<div ms-controller="problemList" class="col-md-9">
    <h1>题目列表</h1>

    <div class="right">
        <form class="form-inline" onsubmit="return false;">
            <div class="form-group-sm">
                <label>搜索</label>
                <input name="keyWord" class="form-control" placeholder="请输入关键词" ms-duplex="keyword">
                <input type="submit" value="搜索" class="btn btn-primary" ms-click="search()">
            </div>
        </form>
        <br>
    </div>
    <table class="table table-striped">
        <tr>
            <th>ID</th>
            <th>题目</th>
            <th>创建时间</th>
            <th>作者</th>
            <th>可见</th>
            <th>通过次数/提交总数</th>
            <td></td>
        </tr>
        <tr ms-repeat="problemList">
            <td>{{ el.id }}</td>
            <td>{{ el.title }}</td>
            <td>{{ el.create_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
            <td>{{ el.created_by.username }}</td>
            <td ms-text="el.visible?'可见':'不可见'"></td>
            <td>{{ el.total_accepted_number }}/{{ el.total_submit_number }}</td>
            <td>
                <button class="btn-sm btn-info" ms-click="showEditProblemPage(el.id)">编辑</button>
                <button class="btn-sm btn-info" ms-click="showProblemSubmissionPage(el.id)">提交</button>
            </td>
        </tr>
    </table>
    <div class="form-group">
        <label>仅显示可见 <input ms-duplex-checked="showVisibleOnly" type="checkbox"/></label>
    </div>
    <div class="text-right">
        <ms:pager $id="problemPager" config="pager"></ms:pager>
    </div>
</div>
<script src="/static/js/app/admin/problem/problem.js"></script>